﻿--[[
Rule name: FastJSON vulnerability interception
Filtering stage: Request phase
Threat level: Critical
Rule description: Intercept FastJSON vulnerability attacks
--]]


local jsonFilter = waf.jsonFilter

local function rMatch(v)
    if v == "@type" then
        return true, v
    end
    return false
end

local form = waf.form
if form then
    local raw = form["RAW"]
    local m = jsonFilter(raw, rMatch, false)
    if m then
        return m, raw, true
    end
end

return false